<?php

namespace Library\Entities;

class Channels extends \Library\Entity {

    protected $id,
            $nom,
            $number_of_download,
            $description,
            $date_depot,
            $poster;

    const TITLE_INVALIDE = 2;

    public function isValid() {
        return !(empty($this->nom));
    }

// SETTERS //
    public function setNom($nom) {
        if (!is_string($nom) || empty($nom))
            $this->erreurs[] = self::NOM_INVALIDE;
        else
            $this->nom = $nom;
    }

    public function setDescription($description) {
        $this->description = $description;
    }
    
    public function setDate($date_depot) {
        $this->date_depot = $date_depot;
    }
    
    public function setPoster($poster) {
        $this->poster = $poster;
    }

// GETTERS //

    public function nom() {
        return $this->nom;
    }
    
    public function description() {
        return $this->description;
    }
    
    public function date_depot() {
        return $this->date_depot;
    }
    
    public function poster() {
        return $this->poster;
    }

}

?>
